#include "win_netw.h"
#include <stdio.h>


/*void main()
{
	TNetLink *lnk = net_startUDP(6111);

	printf("Init ok\n");
	unsigned char data[]={0xad, 0x2b, 0x14, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x58, 0x45, 0x53, 0xcf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

	net_sendUDP(lnk, NULL, data, 20);

	printf("Sent\n");

	while(1)
	{
		char buf[1024];
		int n;
		TNetAddr client;

		if ((n = net_recvUDP(lnk, &client, buf, 1024))>0)
		{
			char addr[100];
			net_getAddrStr(&client, addr);
			printf("Received %d bytes from %s: \n", n, addr);
			for (int i=0;i<n;i++)
			{
				printf("0x%02x",(unsigned char)buf[i]);
				if (i<n-1)
				{
					if (i % 16 == 15)
						printf(",\n");
					else
						printf(", ");
				}
				else
					printf("\n");
			}

			for (int i=0;i<n;i++)
			{
				if ((unsigned char)buf[i]<32)
					putchar('.');
				else
					putchar(buf[i]);
			}
			printf("\n\n");
		}
	}
}*/


extern void mainLoop();

void main()
{
	mainLoop();
}